#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2018, Intel Corporation
#
#
# rpmemd_config/TEST1 -- test for rpmemd valid config file
#

. ../unittest/unittest.sh

require_test_type medium
require_build_type debug
require_fs_type any

setup

RPMEMD=./rpmemd_config$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
LOG_TEMP=out${UNITTEST_NUM}_temp.log
rm -f $LOG $LOG_TEMP

CONFIG=in${UNITTEST_NUM}.conf

expect_normal_exit $RPMEMD -c $CONFIG
cat $LOG >> $LOG_TEMP

expect_normal_exit $RPMEMD --config $CONFIG
cat $LOG >> $LOG_TEMP

$GREP -v rpmemd_config $LOG_TEMP > $LOG

check

pass
